function b(){	
	t = parseInt(x.css('top'));
	y.css('top','44px');	
	x.animate({top: t - 44 + 'px'},'slow');	//30Ϊÿ��li�ĸ߶�
	if(Math.abs(t) == h-44){ //30Ϊÿ��li�ĸ߶�
		y.animate({top:'0px'},'slow');
		z=x;
		x=y;
		y=z;
	}
	setTimeout(b,3000);//�������ʱ�� ������3��
}
$(document).ready(function(){
	$('.swap').html($('.newsList').html());
	x = $('.newsList');
	y = $('.swap');
	h = $('.newsList li').length * 44; //30Ϊÿ��li�ĸ߶�
	setTimeout(b,3000);//�������ʱ�� ������3��
	$('.menu > ul > li:last').addClass('nr');
	$('.menu > ul > li:first').addClass('nl');
	$('.menu ul li').hover(function(){
		$(this).addClass('open');
	},function(){
		$(this).removeClass('open');
	});
	/*nav*/
	$('.mobilenav').click(function(){
		$(this).toggleClass('curbtn');
		$('.nav').toggleClass('open');
		$('.mobilesch').removeClass('cursch');
		$('.search-form').removeClass('open');
	});
	$('.mobilesch').click(function(){
		$(this).toggleClass('cursch');
		$('.search-form').toggleClass('open');
		$('.mobilenav').removeClass('curbtn');
		$('.nav').removeClass('open');
	});
	$('.site-post .site-entry img,.post .entry img').attr('height','auto');
	$('.site-post .site-entry img,.post .entry img').css('height','auto');
});
jQuery(document).ready(function() {
    jQuery('.sidebar').theiaStickySidebar({
      // Settings
      additionalMarginTop: 30
    });
  });
  
  $(document).ready(function($){
	// browser window scroll (in pixels) after which the "back to top" link is shown
	var offset = 300,
		//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
		offset_opacity = 1200,
		//duration of the top scrolling animation (in ms)
		scroll_top_duration = 700,
		//grab the "back to top" link
		$back_to_top = $('.cd-top');

	//hide or show the "back to top" link
	$(window).scroll(function(){
		( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
		if( $(this).scrollTop() > offset_opacity ) { 
			$back_to_top.addClass('cd-fade-out');
		}
	});
	//www.sucaijiayuan.com
	//smooth scroll to top
	$back_to_top.on('click', function(event){
		event.preventDefault();
		$('body,html').animate({
			scrollTop: 0 ,
		 	}, scroll_top_duration
		);
	});

});